<?php
/**
 * @version      BOSSCMS-Free
 * @trademark    BOSSCMS
 * @copyright    Copyright © by BOSSCMS-Free (https://www.bosscms.net/) 保留所有权利
 * @license      https://gitee.com/Greenpeas/BOSSCMS/license/ 和 https://www.bosscms.net/freelicense/
 * @link         https://www.bosscms.net/
 * @author       温州软界网络技术有限公司
**/
defined('IS_OK') or exit('Access Forbidden');
?>
<?php load::into('head'); ?>
<form action="<?php echo url::mpf('language','language','modify'); ?>" method="post" enctype="multipart/form-data">
<section class="main table">
  <aside>
    <div>
      <div class="head">
        <a class="button green" easy width="800" height="500" url="<?php echo url::mpf('language','language','edit'); ?>">
          <em class="fa fa-plus"></em>
          <font>添加语言</font>
        </a>
      </div>
      <table>
        <tbody>
          <tr>
            <th>选择</th>
            <th>排序</th>
            <th>语言</th>
			      <th>默认</th>
            <th>状态</th>
            <th>操作</th>
          </tr>
          <?php foreach($data as $k=>$v){ ?>
          <tr>
            <td width="48"><?php echo form::checkbox('id',null,null,array($v['id']=>null)); ?></td>
            <td width="58"><?php echo form::input("sort{$v['id']}",$v['sort'],null,'text',null); ?></td>
            <td><?php echo $v['name']; ?> <small>[id: <?php echo $v['id']; ?>]</small></td>
			      <td width="118">
              <?php if($v['defaults']){ ?>
              <a class="btnfa green">
                <em class="fa fa-check" title="已为默认"></em>
              </a>
              <?php }else{ ?>
              <a class="btnfa black isdefault" data-id="<?php echo $v['id']; ?>" data-url="<?php echo url::mpf('language','language','defaults'); ?>">
                <em class="fa fa-mouse-pointer" title="设为默认"></em>
              </a>
              <?php } ?>
			      </td>
            <td width="88"><?php echo form::radio("display{$v['id']}",$v['display'],1,$G['option']['is'],array('color'=>'green','post'=>'{"id[]":"'.$v['id'].'"}','url'=>url::mpf('language','language','modify'))); ?></td>
            <td width="198">
              <a class="btnfa black" href="<?php echo url::home($v['id']); ?>" title="<?php echo $v['name']; ?>" target="_blank">
                <em class="fa fa-eye" title="浏览"></em>
              </a>
              <a class="btnfa black" easy width="800" height="500" name="语言修改" url="<?php echo url::mpf('language','language','edit',array('id'=>$v['id'])); ?>">
                <em class="fa fa-pencil" title="修改"></em>
              </a>
              <a class="btnfa red delete" url="<?php echo url::mpf('language','language','delete',array('id'=>$v['id'])); ?>">
                <em class="fa fa-trash-o" title="删除"></em>
              </a>
            </td>
          </tr>
          <?php } ?>
        </tbody>
      </table>
    </div>
  </aside>
</section>
<section class="refer">
  <a class="button green  checkall">
    <em class="fa fa-square"></em>
    <font>全选</font>
  </a>
  <a class="button green tfa nocheckall">
    <em class="fa fa-square-o"></em>
    <font>取消</font>
  </a>
  <button class="button green ">
    <em class="fa fa-sort"></em>
    <font>排序</font>
  </button>
  <a class="button red tfa delcheck" url="<?php echo url::mpf('language','language','delete'); ?>">
    <em class="fa fa-trash-o"></em>
    <font>删除</font>
  </a>
</section> 
</form>
<?php load::into('foot'); ?>